home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / dev / gg / bing-1.1.3.lha / bing-1.1.3 / Readme.txt < prev   
Text File  |  1997-06-06  |  12KB  |  348 lines

  1.                  ** Unofficial Release **
  2.             Bing 1.1.3
  3.  
  4.  
  5. Table of Contents
  6. -----------------
  7.  
  8. 1. What is bing ?
  9. 2. Infos on bing
  10. 3. Installing bing
  11.    1. Installing bing on Unix systems
  12.    2. Installing bing on Windows systems
  13. 4. How to use bing
  14. 5. Measurement problems
  15. 6. Packet loss evaluation
  16. 7. Ethernet devices measurement
  17. 8. Possible NTP influence
  18. 9. Possible enhancements
  19.  
  20. 1. What is bing ?
  21. -----------------
  22.  
  23. Bing is a point-to-point bandwidth measurement tool (hence the
  24. 'b'), based on ping.
  25.  
  26. Bing determines the real (raw, as opposed to available or average)
  27. throughput on a link by measuring ICMP echo requests roundtrip times
  28. for different packet sizes for each end of the link.
  29.  
  30. Suppose we are on host A and want to know the throughput between
  31. L1 and L2, two extremities of a point-to-point link.
  32.  
  33.     A ----( the Internet )--- L1 --- L2
  34.  
  35. If we know the rtt (roundtrip time) between A and L1, and the rtt
  36. between A and L2, we can deduce the rtt between L1 and L2.
  37.  
  38. If we do that for two different packet sizes, we can compute the
  39. raw capacity (bps) of the link.
  40.  
  41. Note that bing can also be used to have an idea of ethernet cards
  42. performance.
  43.  
  44. Many thanks to the following people for their help, hints, support,
  45. and real beers :
  46.  
  47.     Marc Baudoin        <babafou@ensta.fr>
  48.     Fran‡ois Berjon        <fcb@gwynedd.frmug.fr.net>
  49.     Julien Boissinot    <jb@spia.freenix.fr>
  50.     St‰phane Bortzmeyer    <bortzmeyer@cnam.fr>
  51.     Jacques Caron        <jcaron@pressimage.net>
  52.     Laurent Chemla        <laurent@brasil.frmug.fr.net>
  53.     Ren‰ Cougnenc        <rene@renux.frmug.fr.net>
  54.     Nat Makarevitch        <nat@nataa.frmug.fr.net>
  55.     Jean-Philippe Nicaise    <nicky@fdn.fr>
  56.     Christian Perrier    <perrier@onera.fr>
  57.     Bertrand Petit        <elrond@imladris.frmug.fr.net>
  58.     Philippe Regnauld    <regnauld@tetard.freenix.fr>
  59.     Ollivier Robert        <roberto@keltia.freenix.fr>
  60.     Herv‰ Schauer        <herve@hsc.fr.net>
  61.     Christophe Wolfhugel    <wolf@pasteur.fr>
  62.  
  63. Send virtual beers, bug reports, enhancements and flames to :
  64.  
  65.     Pierre Beyssac        <pb@fasterix.freenix.fr>
  66.  
  67. 2. Infos on bing
  68. ----------------
  69.  
  70. You can subscribe to the "bing-users" mailing list by sending a
  71. mail containing :
  72.  
  73.     subscribe bing-users
  74.  
  75. to <majordomo@freenix.fr>.
  76.  
  77. The posting address is <bing-users@freenix.fr>
  78.  
  79. 3. Installing bing
  80. ------------------
  81.  
  82. The provided source has been compiled and run on :
  83.  
  84.     Linux 2.0.28
  85.     SunOS 4.1.3
  86.     SunOS 5        (Solaris 2.5)
  87.     AIX 2        (BOSX 2 actually)
  88.     OSF1 V2.0    (DEC Alpha)
  89.     Windows 95
  90.     Windows NT 3.51 and 4.0 on i386
  91.  
  92. It is expected to compile and run with minor changes in the Makefile on 
  93. many more platforms.
  94.  
  95. 3.1. Installing bing on Unix systems
  96. ------------------------------------
  97.  
  98. You should first edit the Makefile to adjust it to your system. There are 
  99. few options and if your host is in the list above the lines to uncomment 
  100. are already listed. If this is not the case you will have to make a few tries but it should not be very difficult. Send me the options that you had to change together with your "uname -s -r" so that I can add it to the list.
  101.  
  102. Then (on all systems) :
  103.     $ make
  104.     $ su root
  105.     # make install
  106.  
  107. bing, like ping, needs to be installed setuid root to be able to
  108. make its own ICMP packets.
  109.  
  110. 3.2. Installing bing on Windows systems
  111. ---------------------------------------
  112.  
  113. To compile bing you must also get the icmp package. This is a 
  114. package which provides the required include files and libraries 
  115. to send and receive ICMP messages.
  116.  
  117. You may also have to modify the file makefile.nt so that ICMP_DIR points to the place where you have put the ICMP package.
  118.  
  119. Then the command below should be enough:
  120.     nmake -f makefile.nt
  121.  
  122. There are options you may add to this command line to customise the result. 
  123. All options are disabled by default:
  124.   - DLL=1
  125.     Links bing with the Dll C library rather. This makes bing much smaller 
  126.     but may require that you ship the Dll with it.
  127.  
  128.   - DEBUG=1
  129.     Builds a debug version.
  130.  
  131.   - BROWSER=1
  132.     Generates Visual C++'s "browser" database.
  133.  
  134. and commands
  135.   - all or <nothing>
  136.     Builds bing.
  137.  
  138.   - clean
  139.     Removes the generated files.
  140.  
  141.   - help
  142.     Describes the makefile options.
  143.  
  144. 4. How to use bing
  145. ------------------
  146.  
  147.     1) using 'traceroute', find the IP adresses of the endpoints
  148.        of the link you want to measure.
  149.  
  150.     2) try :
  151.  
  152.         bing -v point1 point2
  153.  
  154.        where 'point1' is the nearest endpoint.
  155.        Option '-v' is useful to be warned of any routing problems.
  156.  
  157.     3) wait a little for the measure to stabilize.
  158.  
  159.     4) if after a while, the measurement looks weird (typically,
  160.        negative or amazing throughputs) have a look at the indicated
  161.        roundtrip times. If they are too small (below a few milliseconds),
  162.        try to rerun bing with a bigger packet size :
  163.  
  164.         bing -S 1000 -v point1 point2
  165.  
  166.        CAUTION : do not increase packet size too much, because this
  167.              could trigger IP fragmentation/reassembly on
  168.              the link to measure *or* on intermediate links,
  169.              which messes up the measures completely.
  170.  
  171.              If you stay below 1400 bytes, you should be safe
  172.              (except on SLIP links where you should not go over
  173.              1000). This depends on the MTU (maximum transmit unit)
  174.              of the link.
  175.  
  176.     5) if, after increasing packet size, you still can't get stable
  177.        results, try to use the -z option. This option fills packets
  178.        will random data, defeating compressed links.
  179.  
  180.     6) if you still can't get anything reasonnable, the link you're
  181.        trying to measure is probably a high-throughput link too far
  182.        away (network- and throughput-wise) from you, or some weird
  183.        animal (IP over X25, Frame Relay, ATM, satellite...).
  184.  
  185.        You can try to run bing from a better connected machine
  186.        (with respect to the target link). If you can't, you
  187.        can always try to think of a way (I'm sure there are)
  188.        of improving bing to make it work anyway :-).
  189.  
  190.        Probably the best solution is to find something else to
  191.        do (I leave it to your choice entirely, suggestions are :
  192.        go for a walk, eat, drink, be elected).
  193.  
  194. 5. Measurement problems
  195. -----------------------
  196.  
  197. There are many cases in which the measurements may not be accurate
  198. (read:  "plain wrong") :
  199.  
  200.     - links attained through a link of much lower throughput
  201.       (typically, don't expect to measure a 34Mbps backbone
  202.       link through your V32bis dialup account). You can
  203.       expect to measure links about 15 to 30 times faster than
  204.       the slower link in your path to them, i.e. up to 512kbps
  205.       through a V32bis modem, up to 2Mbps through a 64kbps
  206.       link, and so on.
  207.  
  208.     - saturated links. bing works by measuring the minimal rtts.
  209.       The more saturated links there are in the measure path,
  210.       the more time it takes to get a packet through all of
  211.       them with minimal delay.
  212.  
  213.     - IP/X25 connections. Due to encapsulation in small packets,
  214.       it is very difficult to know the "raw" bit capacity
  215.       because the overhead by IP packet is not fixed and varies
  216.       with the packet size. However, a clever bing could be
  217.       able to find out about the encapsulating size by slowly
  218.       increasing the strobe packet size and detecting steps in
  219.       the rtt increase.  Maybe one day ;-)
  220.  
  221.     - more generally, what you might call "hidden multi-hop" links can
  222.       give strange results. This includes IP over X25, Frame Relay,
  223.       as well as probably any IP encapsulation over a switched
  224.       packet network.
  225.  
  226.     - padding. On many links, the smallest packet size is bigger than
  227.       the smallest possible IP packet size and padding occurs. For
  228.       example it happens on ethernet. It tends to give optimistic
  229.       results.
  230.  
  231.     - non symmetrical routing : 
  232.  
  233.              -----------------<---
  234.              |             |
  235.              |            ( somewhere )
  236.              |             ^
  237.              |             |
  238.     A ---( the Internet )--> L1 ---> L2
  239.  
  240.       If the routings are set in such a way that the ICMP echo
  241.       replies from L2 don't cross the L1-L2 link, bing can't
  242.       reliably compute the link capacity.
  243.  
  244.       It generally happens, at least in France, on links crossing
  245.       ASs (autonomous systems) between different providers.
  246.       Sadly, these links happen to be the most interesting to
  247.       measure, to be able to check providers claims regarding
  248.       their connection with the rest of the world...
  249.  
  250.       I don't think there's an easy way around (this is the
  251.       same problem as traceroute not being able to report
  252.       network return paths).
  253.  
  254. I have been objected that high-bandwidth links with dedicated
  255. routers might be impossible to measure, due to the way these devices
  256. work.
  257.  
  258. Fast routers are designed in such a way that, when receiving a
  259. packet, they decode the header as soon as possible, even before
  260. the packet is completely received. They can thus decide on an
  261. outgoing route for the packet and might even (I'm not sure about
  262. that) begin resending it before receiving it completely.
  263.  
  264. This should not directly interfere with ICMP ECHO_REQUEST packets
  265. because these packets must be locally processed and this is generally
  266. done entirely by software at a lower priority when the packet has
  267. been completely received.
  268.  
  269. Moreover, since bing only considers minimal round-trip times in
  270. its throughput calculations, you only have to expect that some ICMP
  271. ECHO_REQUESTs will be processed by the router as soon as they are
  272. received, which should happen often enough if the router is not
  273. saturated.
  274.  
  275. 6. Packet loss evaluation
  276. -------------------------
  277.  
  278. Knowing the packet losses on A-L1 and on A-L2, it should be possible
  279. to compute the loss between L1 and L2 :
  280.  
  281.     A --- L1 --- L2
  282.        a      b
  283.  
  284.     A-L1 packet loss = a
  285.     A-L2 packet loss = ab
  286.     L1-L2 packet loss = ab / a
  287.  
  288. Bing attempts to calculate it, but the results are generally not significant.
  289.  
  290. 7. Ethernet devices measurement
  291. -------------------------------
  292.  
  293. This might sound surprising, since ethernet throughput is known to
  294. be 10Mbps !
  295.  
  296. By running bing between two machines on an ethernet, you can evaluate
  297. the CPU overhead induced by memory copies and polled I/O.
  298.  
  299. For example, between two Sparc 2 running SunOS 4.1.3, I generally
  300. get around 9Mbps. Between two PCs running FreeBSD with NE2000
  301. clones, expect around 4 or 5Mbps (or a little more depending on
  302. processor speed). Between two PCs with 3C509 cards, I get about
  303. 7Mbps.
  304.  
  305. 8. Possible NTP influence
  306. -------------------------
  307.  
  308. Though I never got any evidence of it, it is possible that running
  309. bing on a NTP-synchronized machine introduces a bias in the
  310. measurements, when the NTP daemon makes a small correction while
  311. bing is waiting for an echo reply packet (almost all the time).
  312.  
  313. I suppose this should mainly have an effect when measuring fast
  314. and far away links, which are difficult or impossible to measure
  315. anyway.
  316.  
  317. 9. Possible enhancements
  318. ------------------------
  319.  
  320.  * It should be possible to measure mono-directional throughput by
  321. varying the packet size only for one of the packets, the sent packet or
  322. the received packet.
  323.  
  324. For example, sending variable-sized ICMP ECHO_REPLY packets with a 
  325. small TTL should elicit fixed-size "ttl exceeded" replies.
  326.  
  327.  * Another interesting extension would be a mechanism trying to
  328. determine the optimal big packet size in such a way that the
  329. measurement is accurate enough yet fast.
  330.  
  331.  * Bing derives from ping and it shows. Its structure could probably be 
  332. enhanced, modularised and simplified. Also many options that were 
  333. significant for ping are not significant for bing and could be removed.
  334.  
  335.  * Most of the IP options are not supported by the icmp part of the 
  336. Win32 version. While they may not really be needed it they could be 
  337. by building the IP options by hand.
  338.  
  339.  * The Win32 error reporting needs to be fixed. It reflects more what
  340. could have happened on Unix that what actually happened and the error
  341. codes are usually incorrect.
  342.  
  343.  * The makefile is probably too Visual C++ centric. I'd be interested in a 
  344. makefile for Borland or Watcom or other.
  345.  
  346.  * An option to disable the "smart" display of the measured bandwidth could
  347. ease the parsing of the results by a script.
  348.